﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContactList.aspx.cs" Inherits="Myproject.BSM.PcWeb.PcBase.ContactList" %>

<div class="bjui-pageHeader">
    <form id="pc_base_friend_form" data-toggle="ajaxsearch" action="/bsm/pcweb/PcBase/ContactList.aspx" method="post">
    <div class="bjui-searchBar">
        <ul class="breadcrumb">
            <li><a><i class="fa fa-university"></i>后台管理中心</a></li>
            <li><a><i class="fa fa-desktop"></i>电脑端管理</a></li>
            <li class="active"><a><i class="fa fa-group"></i>联系方式</a></li>
        </ul>
    </div>
    <div class="bjui-searchBar">
        <a class="btn btn-orange" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">刷新</a>
        <a class="btn btn-green" href="/bsm/pcweb/PcBase/ContactEdit.aspx" data-toggle="dialog" data-width="600" data-height="400" data-title="新增联系方式" data-id="pc_base_ContactEdit" data-icon="plus">新增</a>
    </div>
    </form>
</div>
<div class="bjui-pageContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="true" style="text-align: center;">
        <%--<caption>...</caption>--%>
        <thead>
            <tr>
                <th style="text-align: center;"></th>
                <th style="text-align: center;">名称</th>
                <th style="text-align: center;">排序</th>
                <th style="text-align: center;">状态</th>
                <th style="text-align: center;">操作</th>
            </tr>
        </thead>
        <tbody>
            <%if (MessageTable != null && MessageTable.Rows.Count > 0)
              {
                  System.Data.DataRow[] rows = MessageTable.Select(" ", "rank");
                  int i = 1;
                  foreach (System.Data.DataRow row in rows)
                  {
                        
            %><tr>
                <th style="text-align: center;"><%= i %></th>
                <td style="text-align: center;"><%= row["Name"] %></td>
                <td>
                    <a class="btn btn-green" href="/bsm/ashx/PcBase/contactAjax.ashx?dos=rank&id=<%= row["ContactID"] %>&rank=1" data-toggle="doajax"><i class="fa fa-arrow-down"></i></a>
                    <span class="label label-info"><%= row["Rank"] %></span>
                    <a class="btn btn-green" href="/bsm/ashx/PcBase/contactAjax.ashx?dos=rank&id=<%= row["ContactID"] %>&rank=-1" data-toggle="doajax"><i class="fa fa-arrow-up"></i></a>
                </td>
                <td>
                    <% if (bool.Parse(row["show"].ToString()))
                       { %>
                    <a href="/bsm/ashx/PcBase/contactAjax.ashx?dos=show&id=<%= row["ContactID"] %>&show=false" class="btn btn-green" data-toggle="doajax" data-icon="eye">已显示</a>
                    <%}
                       else
                       {
                    %>
                    <a href="/bsm/ashx/PcBase/contactAjax.ashx?dos=show&id=<%= row["ContactID"] %>&show=true" data-toggle="doajax" class="btn btn-red" data-icon="eye-slash">已隐藏</a>
                    <%
                       } %>
                </td>
                <td>
                    <a href="/bsm/ashx/PcBase/contactAjax.ashx?dos=delete&id=<%= row["ContactID"] %>" class="btn btn-red" data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？">删除</a>
                    <a class="btn btn-green" href="/bsm/pcweb/PcBase/contactEdit.aspx?id=<%= row["ContactID"] %>" data-toggle="dialog" data-width="600" data-height="400" data-id="pc_base_ContactEdit" data-title="联系方式编辑">编辑</a>
                </td>
            </tr>
            <%
                       i++;
                  }
              }%>
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
</div>

